package com.sq.controller;

import com.sq.service.SystemUpdateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

@RestController
@RequestMapping("/systemUpdate")
@CrossOrigin
public class SystemUpdateController {
    @Autowired
    private SystemUpdateService systemUpdateService;
    private String linShi="/Users/admin/Desktop/my-demo/test/update/";

    @PostMapping("/update")
    public String update(@RequestParam("sqai") MultipartFile sqai) {

        return systemUpdateService.update(sqai);


    }

}
